<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@include file="he_includePackage.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="ZH-CN">
<head>
<title>发布优秀论文</title>
<meta http-equiv="X-UA-Compatible" content="IE=9">
<meta name="keywords" content="吉珠,吉林大学,吉林大学珠海学院,吉林大学珠海学院论文管理">
<meta name="content-type" content="text/html" charset="UTF-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href=".//css/bootstrap.css" type="text/css">
<link rel="stylesheet" href=".//css/flow.css" type="text/css">
<script src=".//js/jquery-2.1.1.js" type="text/javascript"></script>
<script src=".//js/bootstrap.js" type="text/javascript"></script>
<style>
.col-xs-3 {
	padding: 1px;
	height: 710px;
}

.col-xs-9 {
	height: 710px;
}

#xs12 {
	height: 604px;
	width: 313px;
}
</style>
<script type="text/javascript" language="javascript">
	function g(o) {
		return document.getElementById(o);
	}
	function hoverli(n) {
		for ( var i = 1; i <= 28; i++) {
			{
				g('tb_' + i).className = '';
			}
			g('tb_' + n).className = 'actived';
		}
	}

	$(function() {

		$('#sct2_1').datagrid({
			url : '<%=request.getContextPath()%>/getsct2_1Info',
			pagination : true,
			fit : true,
			sortName : 'stuNo',
			sortOrder : 'asc',
			fitColumns : true,
			toolbar: [{
							iconCls: 'icon-ok',
							text:'确定',
							handler: function(){
								var id=$('#sct2_1').datagrid('getChecked');
								console.info(id);
								var s='';
								for(var i=0;i<id.length;i++)
									s=s+id[i].thesis+',';
								$.ajax({
			url : '<%=request.getContextPath()%>/sct2change',
											data : {
												'id' : s
											},
											success : function(r) {
												$('#sct2_1').datagrid('reload');
												$('#sct2_2').datagrid('reload');
											},
											error : function(r) {
											}
										});
							}
							}],
			columns : [ [ {
				field : 'stuNO',
				title : '学生学号',
				width : 50
			}, {
				field : 'stuName',
				title : '学生姓名',
				width : 50
			}, {
				field : 'thesisName',
				title : '课题名称',
				width : 200
			}, {
				field : 'tchName',
				title : '指导教师',
				width : 50
			}, {
				field : 'choose',
				title : '发布选择',
				width : 10,
				checkbox : true
			} ] ]
		});

		$('#sct2_2')
				.datagrid(
						{
							url : '<%=request.getContextPath()%>/getsct2_2Info',
			pagination : true,
			singleSelect : true,
			fit : true,
			sortName : 'stuNo',
			sortOrder : 'asc',
			fitColumns : true,
			columns : [ [ {
				field : 'stuNO',
				title : '学生学号',
				width : 50
			}, {
				field : 'stuName',
				title : '学生姓名',
				width : 50
			}, {
				field : 'thesisName',
				title : '课题名称',
				width : 200
			}, {
				field : 'tchName',
				title : '指导教师',
				width : 50
			}, {
				field : 'man',
				title : '发布人',
				width : 50
			}, {
				field : 'issuetime',
				title : '发布时间',
				width : 50
			}, {
				field : 'choose',
				title : '操作',
				width : 30,
				formatter : function(value, row, index) {
					return '<button onclick="del('+row.thesis+')">删除</button>';
				}
			} ] ]
		});
	});
	function del(index)
							{
								$.ajax({
			url : '<%=request.getContextPath()%>/sct2del',
											data : {
												'id' : index
											},
											success : function(r) {
											$('#sct2_1').datagrid('reload');
												$('#sct2_2').datagrid('reload');
											},
											error : function(r) {
											}
										});
							}
									function showWhat()
		{
			var collap=document.getElementById('collapseHelp');
			if(collap.style.display=='none')
				collap.style.display='block';
			else
				collap.style.display='none';
		}
</script>
</head>

<body>
	<!--全局框架 开始 conteiner-->
	<div class="container">
		<!--标题头图片-->
		<div class="row">
			<div class="body_top">
				<img src="img/head.png" align="center" width="1280px" />
			</div>
		</div>
		<!--全局12栅格 规划全局区域图线 开始 row+ col-->
		<div class="row">
			<jsp:include page="secretary_siderbar.jsp"></jsp:include>

			<!--左侧跳转框架结束-->
			<!--右侧用户操作模块 占全局9栅格-->
			<div class="col-xs-9" style="border:2px solid #25465d">
				<div class="row">
					<div class="row">
						<div class="col-xs-12  xs11"
							style="margin-bottom:0px; margin-top:5px;">
							<strong><font size="3">流程管理》发布优秀论文</font> </strong>
						</div>
					</div>
					<div class="col-xs-11  xs11"
						style="margin-bottom:0px; margin-top:0px;">
						<div class="panel panel-default"
							style="margin-bottom:10px; margin-top:2px;">
							<div class="panel-heading" align="left">
								<a data-toggle="collapse" data-parent="#accordion"
									href="#collapseHelp" class="glyphicon glyphicon-chevron-down" onclick="showWhat()">
									操作指南 </a>
							</div>
							<div id="collapseHelp" class="panel-collapse collapse">
								<div class="panel-body">
									发布优秀论文：
									<ul>
										<li>由教学秘书将系内部分优秀论文发布出去。</li>
										<li>学生和老师都可以看到优秀论文。</li>
									</ul>
								</div>
							</div>
						</div>
					</div>
				</div>

						<p>待发优秀论文列表：</p>
						<div style="height:200px;">
						<table id="sct2_1"></table>
						</div>


						<p>已发优秀论文列表：</p>
						<div style="height:200px;">
						<table id="sct2_2"></table>
						</div>
			</div>
			<!--修改结束-->
		</div>
		<!--全局12栅格 规划全局区域图线 结束 row+ col-->
	</div>
	</div>
	<div class="row" style="background-color:#25465d"">
		<p align="center" style="color:white;background-color:#25465d">
			<strong>用户单位：</strong>吉林大学珠海学院&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>版权所有：</strong>吉林大学珠海学院计算机科学与技术系
		</p>
	</div>
	<!--全局框架结束 conteiner-->
	</div>
</body>
</html>
